PreviousNextTracker indexSee it online !

(239/314) 3614902 - BufferTabs reorders the tabs

jEdit version number:
5.0.0

BufferTabs plugin and version numbers:
1.2.3

platform:
windows (win 7)

Java version:
1.6.0_29

currently the tabs are reordered without any reason (or is it a java feature?)

steps to reproduce:
1. open files to fill 1 line BufferTabs on top of the screen
2. open one more file

expected result:
- the older file's tab should be remained on their place
- only the new file's tab should be appeared in the new tab line

Submitted drvdrv - 2013-08-13 - 08:59:39z Assigned nobody
Priority 5 Category None
Status Open Group None
Resolution None Visibility No

Comments

2013-11-16 - 12:49:47z
ezust
Under Global options - View, do you have the option 'Sort buffer sets' un-checked?
What bufferset scope do you use? Did you have multiple views or editpanes open?



2013-11-18 - 06:55:07z
drvdrv
Hi,
Maybe the title of bug is not correct. So there is no real reordering just new (and older existing tab(s)) are moved to the next row.
It does not matter if 'Sort buffer sets' is checked or un-checked. And the scope is also irrelevant.

I did some experiments, and now I am sure that this is the java default behavior (but why???). Try the code bellow. Start it and re-size the window (decrease the width). When there is no space enough for all tabs, not only the last tab will be moved to the next row but more. In forums I have found some hint how to solve this but it is beyond my java knowledge.

I hope now it is clear what I mean. (Anyway, this is still really annoying. When opening/closing tabs and this happens, I usually lost and I have to start finding the wanted tabs again)



import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;


public class TestTabbedPane extends JTabbedPane {
public static void main(String[] args) {
JFrame test = new JFrame("Tab test");
test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
test.setSize(600, 400);

TestTabbedPane tabs = new TestTabbedPane();

tabs.addTab("One 11111111", new JButton("One"));
tabs.addTab("Two 2222", new JButton("Two"));
tabs.addTab("Three 33333", new JButton("Three"));
tabs.addTab("Four 4444444444", new JButton("Four"));
tabs.addTab("Five 555", new JButton("Four"));
test.add(tabs);
test.setVisible(true);
}
}
2013-11-18 - 12:33:35z
kpouer
It is a feature of tabs in java, we have the choice to wrap taps on new line or add a scrolling when there are too many tabs.
2013-11-18 - 20:08:15z
drvdrv
or, as far as understood, implement a tabbedPane with custom behavior (rendering or sg).
But of course I know that easy to say (write) this.
2013-11-27 - 13:54:03z
drvdrv
Meanwhile I install the LookAndFeel plugin. With Jgoodies L&F the tabbedPane works as I expect, however I do not like its look.
So the solution is somewhere there.

Attachments

2013-08-13 - 08:59:40z
drvdrv
tabs.gif

tabs before and after open new file